package com.qc.dao.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import com.qc.dao.ConfigDao;
import com.qc.entity.ConfigEntity;

@Repository("configDao")
public class ConfigDaoImpl implements ConfigDao {

	@Resource(name = "jdbcTemplate")
    private JdbcTemplate jdbcTemplate;
	
	@Override
	public List<ConfigEntity> getOrderScale() {
		
		String sql = "select config_id,name,type,scale from t_config where type = 1 and if_del = 0";
        
        return jdbcTemplate.query(sql, new BeanPropertyRowMapper(ConfigEntity.class));
	}

}
